import request from '@/utils/request'

/**
 * 获取视频列表
 * @param params
 * @return {*}
 */
export const getVideoListApi = (params) => {
  return request({
    url: '/video',
    method: 'get'
  })
}

/**
 *  获取视频详情
 * @param id
 * @return {*}
 */
export const getVideoDetailApi = (id) => {
  return request({
    url: `/video/${id}`,
    method: 'get'
  })
}

/**
 *  添加视频
 * @param data
 * @return {*}
 */
export const addVideoApi = (data) => {
  return request({
    url: '/video/',
    method: 'post',
    data
  })
}

/**
 * 搜索商品
 * @param vTitle 搜索词
 * @return {*}
 */
export const searchVideoApi = (vTitle) => {
  return request({
    url: '/video/search',
    method: 'get',
    params
  })
}